<?php
error_reporting(E_ALL ^ E_NOTICE);
include("include/function.php");
session_start();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>
<?php 
if($_GET['management']=='user')
{
	if($_GET['task']=='add')
	{
		include("admin/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("admin/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("admin/delete.php");
	}
	
	
	else{
		include("admin/user_list.php");
		}
}
elseif($_GET['management']=='role')
{
	if($_GET['task']=='add')
	{
		include("role/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("role/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("role/delete.php");
	}
	
	
	else{
		include("role/role_list.php");
		}



}
elseif($_GET['management']=='project')
{
if($_GET['task']=='add')
	{
		include("project/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("project/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("project/delete.php");
	}
	
	
	else{
		include("project/project_list.php");
		}
}
elseif($_GET['management']=='client')
{
	if($_GET['task']=='add')
	{
		include("client/add.php");
	}
	elseif($_GET['task']=='edit')
	{
		include("client/edit.php");
	}
	elseif($_GET['task']=='delete')
	{
		include("client/delete.php");
	}
	
	
	else{
		include("client/client_list.php");
		}

}



?>







<a href="index.php?management=user">User Management</a><br>
<a href="index.php?management=role">Role Management</a><br>
<a href="index.php?management=project">Project Management</a><br>
<a href="index.php?management=client">Client Management</a><br>

<?php
}
else
{
header("Location: login.php");
}
?>